package Factory.Factory;

public class Client {
    public static void main(String[] args) {
        Factory factory = (Factory) XMLUtil.getBean();
        Fruit fruit = factory.CreateFruit();
        fruit.eat();

//        Factory factory1,factory2;
//        factory1= new AFactory();
//        factory2 = new BFactory();
//
//        Fruit fruit1,fruit2;
//        fruit1 = factory1.CreateFruit();
//        fruit2 = factory2.CreateFruit();
//
//        fruit1.eat();
//        fruit2.eat();
    }
}
